# -*- coding: UTF-8 -*-
import wx

class splashForm(wx.Dialog):
    def __init__(self,parent=None):
        wx.Dialog.__init__(self, parent, -1)
        self.heading = wx.StaticText(self, -1)
        self.picpanel=wx.Panel(self,-1)
        self.picture = wx.StaticBitmap(self.picpanel)
        self.line1=wx.StaticLine(self, -1)
        self.line2=wx.StaticLine(self, -1)
        self.btnOk=wx.Button(self, 1)
        self.__set_properties()
        self.__set_bindings()
        self.__do_layout()
        
        
    def __set_properties(self):
        self.SetTitle("Über Pyddler")
        self.SetSize(wx.Size(360,370))
        self.SetIcon(wx.Icon('icons/multimedia.png', wx.BITMAP_TYPE_PNG))
        self.heading.SetLabel("Über Pyddler")
        self.heading.SetPosition(wx.Point(130, 15))
        self.heading.SetSize(wx.Size(130,15))
        self.btnOk.SetLabel("OK")
        self.btnOk.SetPosition(wx.Point(140, 310))
        self.btnOk.SetSize(wx.Size(90, 30))
        self.line1.SetPosition(wx.Point(25, 50))
        self.line1.SetSize(wx.Size(300,1))
        self.line2.SetPosition(wx.Point(25, 260))
        self.line2.SetSize(wx.Size(300,1))
        self.picpanel.SetPosition(wx.Point(25,60))
        self.picpanel.SetSize(wx.Size(291,189))
        self.picpanel.SetBackgroundColour(wx.WHITE)
        self.picpanel.SetWindowStyle(wx.SUNKEN_BORDER)
        self.picture.SetBitmap(wx.Bitmap("img/pythia.png", wx.BITMAP_TYPE_PNG))
        
    def __set_bindings(self):
        self.Bind(wx.EVT_BUTTON, self.OnClose, id=1)
        
    def __do_layout(self):
        font = wx.Font(10, wx.DEFAULT, wx.NORMAL, wx.BOLD)
        self.heading.SetFont(font)
        #self.Centre()
        self.Layout()

    def OnClose(self, event):
        self.Close(True)